<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>改变CSS样式</title>
</head>
<body>
    <h3 id="changeColor" onclick="changeColor()">点击改变颜色</h3>
    <script>
        function changeColor()
        {
            var x = document.getElementById("changeColor");
            x.style = "color: red;"
        }
    </script>
</body>
</html>